#if 0

#include <gtest\gtest.h>
#include <boost\asio.hpp>
#include <boost\thread.hpp>
#include <boost\bind.hpp>
#include <string>
#include <boost\shared_ptr.hpp>

#include <connection\server.h>
#include <connection\async_client.h>

namespace constant
{
	const std::string cs_server_port = "6669";
	const std::string cs_server_address = "localhost";
}

using namespace boost::asio::ip;

class mt_cs_server: public ::testing::Test
{
protected:
	typedef boost::shared_ptr<boost::thread> thread_t;
	typedef boost::shared_ptr<cs::server> server_t;
	server_t server;
	thread_t thread;
	boost::asio::io_service io_service;

	mt_cs_server()
	{		
		tcp::endpoint endpoint(tcp::v4(), atoi(constant::cs_server_port.c_str()));
		server.reset(new cs::server(io_service, endpoint));
		thread.reset(new boost::thread(boost::bind(&boost::asio::io_service::run, &io_service)));
	}

	void wait_for_service_start(const int& ms = 1000)
	{
		boost::this_thread::sleep( boost::posix_time::milliseconds(ms) );
	}

	virtual ~mt_cs_server()
	{
		io_service.stop();
		thread->join();
	}
};

#endif
/*
TEST_F(mt_cs_server, first_connect)
{
	::testing::FLAGS_gtest_death_test_style = "threadsafe";
	boost::asio::io_service io_service;

	boost::asio::ip::tcp::resolver resolver(io_service);
	tcp::resolver::query query("localhost", "6669");

	tcp::resolver::iterator iterator = resolver.resolve(query);

	cs::connector c(io_service, iterator);
	boost::thread t(boost::bind(&boost::asio::io_service::run, &io_service));
	wait_for_service_start();

	char line[cs::message::header_length];
	line [0] = 'a';
	cs::message msg;
	memcpy(msg.get_header().data(), line, cs::message::header_length);
	c.write(msg);
	EXPECT_TRUE(c.receive().get_header()[0] == 'a');

	c.close();
	t.join();
}
*/